package com.ycgwl.web.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class FilterTest implements Filter {

	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		System.out.println("已初始化..");

	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException {
		System.out.println("进入拦截器,放行前..");
		chain.doFilter(request, response);
		System.out.println("进入拦截器,放行后..");
	}

	@Override
	public void destroy() {
		System.out.println("已销毁..");

	}

}
